// 注意获取品牌管理的模块
import request from "@/utils/request";

// 获取品牌列表接口
export function reqTradeMarkList(page, limit) {
    return request({
        url: `/admin/product/baseTrademark/${page}/${limit}`,
        method: "get",
    });
}

// 处理添加接口
// 修改接口
export function reqAddOrUpdateTradeMarkList(tradeMark) {
    if (tradeMark.id) {
        return request({
            url: "/admin/product/baseTrademark/update",
            method: "put",
            data: tradeMark,
        });
    } else {
        return request({
            url: "/admin/product/baseTrademark/save",
            method: "post",
            data: tradeMark,
        });
    }
}

// 删除品牌接口
export function reqDeleteTradeMark(id) {
    return request({
        url: `/admin/product/baseTrademark/remove/${id}`,
        method: 'delete'
    })
}